a = {"bobby1":{"company":"imooc"},
     "bobby2":{"company":"imooc2"}
     }

# clear
# a.clear()
# print(a)

# copy 返回浅拷贝
# new_dict = a.copy()
# new_dict["bobby1"]["company"] = "111"

# import copy
# new_dict = copy.deepcopy(a)
# new_dict["bobby1"]["company"] = "111"

# fromkeys
new_list = ["bobby1", "bobby2"]
new_dict = dict.fromkeys(new_list, {"compay":"imocc"})

# value = new_dict["bobby"]
# value = new_dict.get("bobby")
value = new_dict.get("bobby1", "abc")
print(value)

for key, value in new_dict.items():
    print(key, value)

pass